package com.gmail.blackdog1987.carcare;

import android.app.Activity;
import android.os.Bundle;

import com.avos.avoscloud.AVAnalytics;
import com.umeng.analytics.MobclickAgent;

/**
 * 
 * @author 董国超
 *
 */
public abstract class BaseActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		// app 打开统计
		AVAnalytics.trackAppOpened(getIntent());
	}
	
	public void initViews() {
		// TODO Auto-generated method stub

	}
	
	public void reg() {
		// TODO Auto-generated method stub
	}
	
	public void initData() {
		// TODO Auto-generated method stub

	}
	
	public void onResume() {
	    super.onResume();
	    MobclickAgent.onPageStart("SplashScreen"); //统计页面
	    MobclickAgent.onResume(this);          //统计时长
	}
	public void onPause() {
	    super.onPause();
	    MobclickAgent.onPageEnd("SplashScreen"); // 保证 onPageEnd 在onPause 之前调用,因为 onPause 中会保存信息 
	    MobclickAgent.onPause(this);
	}
}
